/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package application.service;

import application.model.EntitySearchResults;
import application.model.EntityLookUp;
import application.dao.EntitySearchResultsDao;
import application.dao.EntityLookUpDao;

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author aa6345
 */
@Service("entitySearchResultsService")
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public class EntitySearchResultsServiceImpl implements EntitySearchResultsService {

    @Autowired
    private EntitySearchResultsDao entitySearchResultsDao;
    @Autowired
    private EntityLookUpDao entityLookUpDao;

    public EntitySearchResultsServiceImpl() {
    }

    public List<EntitySearchResults> listSelectedEntitySearchResults(String userInputHashMap) {
        return entitySearchResultsDao.listSelectedEntitySearchResults(userInputHashMap);
    }

    public List<EntitySearchResults> listSelectedEntitySearchResults(HashMap<String, String> userInputHashMap) {
        return entitySearchResultsDao.listSelectedEntitySearchResults(userInputHashMap);
    }

    public List<EntityLookUp> listEntityLookUpByName(HashMap<String, String> userInputHashMap) {
        return entityLookUpDao.listSelectedEntityLookUpResults(userInputHashMap);
    }

    public List<EntitySearchResults> listSelectedEntityByIDResults(HashMap<String, String> userInputHashMap) {
        return entitySearchResultsDao.listSelectedEntityByIDResults(userInputHashMap);
    }

    public List<EntitySearchResults> listSelectedEntityByIDResults(String keyword, String entityID) {
        return entitySearchResultsDao.listOfEntityAccomplishmentsByKeyword(keyword, entityID);
    }

    public List<EntityLookUp> listEntityLookUpByID(String entityID) {
        return entityLookUpDao.listSelectedEntityLookUpByIDResults(entityID);
    }
}
